package com.shoux.api.web.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import freemarker.template.utility.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 企业信息表
 * </p>
 *
 * @author chris
 * @since 2022-03-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("company_info")
@ApiModel(value="CompanyInfoEntity对象", description="企业信息表")
public class CompanyInfoEntity extends Model<CompanyInfoEntity> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;


    @ApiModelProperty(value = "法人年龄")
    private Integer age;

    @ApiModelProperty(value = "社会统一信用代码")
    private String shtyxydm;

    @ApiModelProperty(value = "企业名称")
    private String qymc;

    @ApiModelProperty(value = "法定代表人名称")
    private String fddbr;

    @ApiModelProperty(value = "法人代表身份证号")
    private String sfzjhm;

    @ApiModelProperty(value = "联系电话")
    private String lxdh;

    @ApiModelProperty(value = "企业类型")
    private String qylx;

    @ApiModelProperty(value = "经营范围")
    private String jyfw;

    @ApiModelProperty(value = "信用等级")
    private String xydj;

    @ApiModelProperty(value = "注册地址")
    private String zs;

    @ApiModelProperty(value = "经营期限自")
    private String jyqsrq;

    @ApiModelProperty(value = "注册号")
    private String zch;

    @ApiModelProperty(value = "公司地址")
    private String jycs;

    @ApiModelProperty(value = "注册资本")
    private String zczb;

    @ApiModelProperty(value = "成立时间")
    private String clrq;

    @ApiModelProperty(value = "经营期限至")
    private String jyjzrq;

    @ApiModelProperty(value = "所属行业")
    private String sshy;

    @ApiModelProperty(value = "登记状态")
    private String djzt;

    @ApiModelProperty(value = "所属区域")
    private String ssqu;

//    @ApiModelProperty(value = "插入时间")
//    @TableField(fill = FieldFill.INSERT)
//    private LocalDateTime insertTime;
//
//    @ApiModelProperty(value = "更新时间")
////    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
////    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
//    @TableField(fill = FieldFill.UPDATE)
//    private LocalDateTime updateTime;



    @ApiModelProperty(value = "插入时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "insert_time", fill=FieldFill.INSERT)
    private Date insertTime;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "update_time",fill=FieldFill.INSERT_UPDATE)
    private Date updateTime;


    @ApiModelProperty(value = "删除标识(0:未删除 1:删除)")
    @TableLogic
    @TableField(fill=FieldFill.UPDATE)
    private Boolean delFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
